#pragma once
#include<iostream>
#include<time.h>
#include<string.h>
using  namespace std;


class Date
{
	friend ostream& operator<<(ostream& out, const Date& d);
	friend istream& operator>>(istream& in,Date& d);
public:
	
	Date(const int year = 2022, const int month = 1, const int day = 1);
	void Print()const;
	int GetMonthDay(int year, int month)const;
	Date& operator+=(int day);
	Date& operator-=(int day);
	Date operator+(int day)const;
	Date operator-(int day)const;
	Date& operator++();
	Date operator++(int);
	Date& operator--();
	Date operator--(int);
	bool operator>(const Date& d)const;
	bool operator==(const Date& d)const;
	bool operator>=(const Date& d)const;
	bool operator< (const Date& d)const;
	int operator-(const Date& d);


private:
	int _year;
	int _month;
	int _day;
};

ostream& operator<<(ostream& out, const Date& d);
istream& operator>>(istream& in, Date& d);